/**
 * 测试 try...catch...finally 语句
 */

console.log('BEGIN');

try {
    console.log(username); // ReferenceError
    console.log('success'); // 若上一行有异常则该行不执行
} catch (e) {
    console.log('fail');
    console.log(e.name, e.message);
} finally {
    console.log('finally');
}

console.log('END');